@import (reference) "./../../UI/components/common.less";

@keyframes fade-in-and-down {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.menu-background {
    position: absolute;
    top: 0px;
    left: 0px;
    bottom: 0px;
    right: 0px;
    background-color: rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.menu {
    .box-shadow;

    position: relative;
    margin-top: 16px;
    padding: 8px;
    width: 75%;
    max-width: 900px;

    input {
        border: 0px;
        background-color: rgba(0, 0, 0, 0.2);
        font-size: 1.1em;
        box-sizing: border-box;
        width: 100%;
        padding: 8px;
        outline: none;
    }

    .items {

        .item {
            padding: 4px;
            margin-top: 4px;

            display: flex;
            flex-direction: row;
            align-items: center;

            user-select: none;
            -webkit-user-drag: none;
            cursor: pointer;
            font-size: @font-size-normal;
            overflow: hidden;

            .fa:not(.fa-spin) {
                padding-right: 8px;
            }

            &:hover {
                background-color: rgba(0, 0, 0, 0.2);
            }
            &.selected {
                .box-shadow;
                background-color: rgba(0, 0, 0, 0.2);
            }

            .label {
                margin: 4px;
                padding-right: 8px;

                .highlight {
                    font-weight: bold;
                    text-decoration: underline;
                }
            }

            .detail {
                font-size: @font-size-small;
                color: @text-color-detail;
                flex: 1 1 auto;

                .highlight {
                    font-weight: bold;
                    text-decoration: underline;
                }
            }
        }
    }

    .footer {
        .box-shadow;

        text-align: center;
        width: 100%;
        transition-property: transform, opacity;
        transition-duration: 0.5s;
        position: absolute;
        bottom: 0px;
        height: 3em;
        margin-left: -8px;

        // Put behind items / menu element
        z-index: -1;

        &.loading {
            transform: translateY(100%);
            opacity: 1;

            .loading-spinner {
                opacity: 1;
            }
        }

        &.loaded {
            opacity: 0;
            transform: translateY(0%);
        }

        .loading-spinner {
            line-height: 3em;
            height: 3em;

            opacity: 0;

            .loading & {
                opacity: 1;
            }
        }
    }
}
